Skip to content

feat!: update target frameworks to netstandard2.0, netstandard2.1, net462, net8.0, net10.0#1031

Merged
MIchaelMainer merged 5 commits intomainfrom
feat/update-target-frameworks
May 1, 2026
Merged

feat!: update target frameworks to netstandard2.0, netstandard2.1, net462, net8.0, net10.0#1031
MIchaelMainer merged 5 commits intomainfrom
feat/update-target-frameworks

Conversation

@gavinbarron
Copy link
Copy Markdown
Member

@gavinbarron gavinbarron commented Apr 20, 2026

Summary

Updates target frameworks across the solution to align with currently supported .NET runtimes.

Closes #1030

Changes

Core library (Microsoft.Graph.Core.csproj)

  • Added: netstandard2.1, net8.0, net10.0
  • Kept: netstandard2.0, net462

Directory.Build.props

  • Removed default net6.0 MAUI target
  • Updated MAUI platform targets from net6.0-* to net8.0-*

Test project (Microsoft.Graph.DotnetCore.Core.Test.csproj)

  • Updated from net6.0 to net462;net8.0;net10.0
  • Downgraded xunit.runner.visualstudio from 3.0.2 to 2.5.8 for net462 compatibility

Trimming test project

  • Updated from net9.0 to net10.0

.gitignore

  • Fixed TestResults pattern to match nested directories

Test compatibility fixes

  • Replaced C# range/index syntax with compatible alternatives
  • Used new HttpMethod("PATCH") instead of HttpMethod.Patch (unavailable on net462)
  • Added #if NETFRAMEWORK guards for WinHttpHandler vs SocketsHttpHandler assertions
  • Added #if NETFRAMEWORK guards for using vs await using on streams
  • Fixed HandlesCancellationTokenAsync to use Assert.ThrowsAnyAsync<OperationCanceledException> for cross-TFM compatibility

Breaking Changes

  • Dropped net6.0 and net9.0 target frameworks (both end-of-life)
  • MAUI targets updated from net6.0-* to net8.0-*

Test Results

All 195 tests pass on all 3 test TFMs (net462, net8.0, net10.0).

Microsoft Reviewers: Open in CodeFlow

@gavinbarron gavinbarron requested a review from a team as a code owner April 20, 2026 17:19
@gavinbarron gavinbarron force-pushed the feat/update-target-frameworks branch 6 times, most recently from 8e07ce9 to 8d76345 Compare April 20, 2026 18:53
MIchaelMainer
MIchaelMainer previously approved these changes Apr 20, 2026
…t462, net8.0, net10.0

BREAKING CHANGE: Dropped net6.0 and net9.0 target frameworks. Added netstandard2.1,
net8.0, and net10.0. Updated MAUI targets from net6.0-* to net8.0-*.
Downgraded xunit.runner.visualstudio to 2.5.8 for net462 test compatibility.
Added conditional compilation directives for net462 test compatibility.

Closes #1030

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
gavinbarron and others added 4 commits April 29, 2026 17:30
…ecated macos

- Update MAUI platform targets from net6.0-* to net10.0-* in Directory.Build.props
- Remove net6.0-macos target (deprecated, covered by maccatalyst)
- Remove dead #elif MACOS code path in GraphClientFactory.cs
- Remove 'macos' from workload install in CI pipelines

The net6.0-macos workload no longer exists in modern .NET SDKs, and the
net6.0-* MAUI platform targets are incompatible with the .NET 10 SDK
used in CI. The base net6.0 TFM is preserved for non-MAUI consumers.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Windows-latest now resolves to Windows Server 2025, providing better
alignment with the .NET 10 SDK and modern MAUI workloads.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
.NET 6 is no longer needed - the project targets net8.0 and net10.0.
Updated SDK install to match the actual target frameworks.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@sonarqubecloud
Copy link
Copy Markdown

@MIchaelMainer MIchaelMainer added this pull request to the merge queue May 1, 2026
Merged via the queue into main with commit 9d95bb1 May 1, 2026
10 checks passed
@MIchaelMainer MIchaelMainer deleted the feat/update-target-frameworks branch May 1, 2026 22:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update target frameworks to netstandard2.0, netstandard2.1, net462, net8.0, net10.0

2 participants